package Work1;

import java.io.*;

/*
 *@Student 张策
 */
public class Copy_ {
    public static void main(String[] args)  {
        String name="e:\\Text1.txt";
        String name2="e:\\Text2.txt";
        BufferedReader bufferedReader = null;
        BufferedWriter bufferedWriter = null;
        String line;
        try {
            bufferedReader = new BufferedReader(new FileReader(name));
            bufferedWriter = new BufferedWriter(new FileWriter(name2,true));
            while ((line=bufferedReader.readLine())!=null) {
                bufferedWriter.write(line);
//                bufferedWriter.write(bufferedReader.readLine());
            }

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                bufferedWriter.close();
                bufferedReader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
